import javax.swing.*;

import java.awt.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
import javax.swing.border.Border;

public class ResultPanel extends JPanel {

	ResultColumn[] resultColumns;
	final int NUM_COLUMNS = 10;
	final int NUM_RESULT_COLORS = 2;

	// adds all the result holders to a result panel
	public ResultPanel() {
		this.setLayout(new GridLayout(1, NUM_COLUMNS));
		resultColumns = new ResultColumn[NUM_COLUMNS];

		for (int i = 0; i < NUM_COLUMNS; i++) {
			resultColumns[i] = new ResultColumn();
		}

		for (int i = 0; i < NUM_COLUMNS; i++) {
			add(resultColumns[i]);
		}
	}

	public void clear() {
		for (int i = 0; i < NUM_COLUMNS; i++) {
			resultColumns[i].clear();
		}
	}

	public void setResult(int pegSet, int[] values) {
		resultColumns[pegSet].setResult(values);
	}
}